<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>首页</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/layui/2.11.2/css/layui.min.css" rel="stylesheet">
    <style>
        .sousuo {
            margin-left: 20px;
            position: relative;
        }

        .sousuo>img {
            width: 20px;
            height: 20px;
            position: absolute;
            top: 20px;
            left: 3px;
            border-radius: 5px 0 0 5px;
        }

        #sou {
            width: 900px;
            height: 25px;
            border-radius: 50px;
            box-sizing: border-box;
            padding-left: 25px;
            border: 0;
        }

        .layui-side-scroll {
            background-color: #1e9fff;
        }

        .layui-nav-tree {
            background-color: #1e9fff;
        }

        #layui-header {
            background-color: #1e9fff;
        }
    </style>
</head>

<body>
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header" id="layui-header">
            <div class="layui-logo layui-hide-xs layui-bg-black" id="layui-bg-black">管理系统</div>
            <!-- 头部区域（可配合layui 已有的水平导航） -->
            <ul class="layui-nav layui-layout-left">
                <!-- 移动端显示 -->
                <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
                    <i class="layui-icon layui-icon-spread-left"></i>
                </li>
                <!-- <li class="layui-nav-item layui-hide-xs"><a href="javascript:;">nav 1</a></li>
                <li class="layui-nav-item layui-hide-xs"><a href="javascript:;">nav 2</a></li>
                <li class="layui-nav-item layui-hide-xs"><a href="javascript:;">nav 3</a></li> -->
                <!-- 搜索 -->
                <li class="layui-nav-item">
                    <div class="sousuo">
                        <img src="https://ts1.tc.mm.bing.net/th/id/OIP-C.lpddQ7iAtQBY3ans1P7oVgHaHa?w=201&h=211&c=8&rs=1&qlt=90&o=6&dpr=1.3&pid=3.1&rm=2"
                            alt="">
                        <input type="text" name="" id="sou" placeholder="请输入内容">
                    </div>
                </li>
            </ul>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
                    <a href="javascript:;">
                        <!-- 头像 -->
                        <img src="//unpkg.com/outeres@0.0.10/img/layui/icon-v2.png" class="layui-nav-img">
                        <span class="yhname">1</span>
                    </a>
                    <!-- 头像旁边的下拉列表 -->
                    <dl class="layui-nav-child">
                        <dd><a href="javascript:;">个人资料</a></dd>
                        <dd><a href="javascript:;">商品列表</a></dd>
                        <dd><a href="javascript:;">设置</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree" lay-filter="test">
                    <li class="layui-nav-item layui-nav-itemed">
                        <a class="" href="./首页.html">商品数据</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="./商品列表.html">商品管理列表</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="./个人资料.html">个人资料</a>
                    </li>
                    <li class="layui-nav-item" id="yi">
                        <a href="./商品详情.html">商品详情</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="layui-body">
            <!-- 内容主体区域 -->
            <div style="padding: 15px;">
                <blockquote class="layui-elem-quote layui-text">
                    商品数据
                </blockquote>
                <div class="layui-card layui-panel">
                    <div class="layui-card-header">
                        下面是充数内容，为的是出现滚动条
                    </div>
                    <div class="layui-card-body">
                        充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>充数内容<br>你还真滑到了底部呀
                    </div>
                </div>
                <br><br>
            </div>
        </div>
        <div class="layui-footer">
            <!-- 底部固定区域 -->
            底部固定区域
        </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/layui/2.11.2/layui.min.js"></script>
    <script src="https://code.jquery.com/jquery-3.7.1.js"></script>
    <script>
        $('document').ready(() => {
            $('#yi').css('background', '#16baaa')

        })
        //JS 
        layui.use(['element', 'layer', 'util'], function () {
            var element = layui.element;
            var layer = layui.layer;
            var util = layui.util;
            var $ = layui.$;

            //头部事件
            util.event('lay-header-event', {
                menuLeft: function (othis) { // 左侧菜单事件
                    layer.msg('展开左侧菜单的操作', { icon: 0 });
                },
            });
        });
        //用户名
        var shu = JSON.parse(localStorage.getItem('1'))
        $('.yhname').html(shu.name)
        //跳转
        function goods_list() {
            location.assign('./商品列表.html')
        }
        var yx = JSON.parse(localStorage.getItem('geren'))
        //头像
        $('.layui-nav-img')[0].src = `${yx.img}`
    </script>
</body>

</html>